package com.fundynamic.coderetreat;

import java.util.ArrayList;
import java.util.List;

public class Referee {

	private List<Cell> cells = new ArrayList<Cell>();

	public void setCells(ArrayList<Cell> cells) {
		this.cells = cells;
	}

	public List<Cell> getCells() {
		return cells;
	}

	public int getNeighbours(Cell cell) {
		int neighbours = 0;
		for (Cell other : cells) {
			if (cell.isAdjecent(other)) {
				neighbours++;
			}
		}
		return neighbours;
	}
}
